package com.test.pattern.command;

/**
 * @ClassName: Client
 * @description:
 * @author: Mr du
 * @create: 2024-03-10 09:56
 */
public class Client {

    public static void main(String[] args) {
        //创建2个order
        Order order1 = new Order();
        order1.setDiningTable(1);
        order1.getFoodDir().put("西红柿鸡蛋面",1);
        order1.getFoodDir().put("小杯可乐",2);

        Order order2 = new Order();
        order2.setDiningTable(3);
        order2.getFoodDir().put("尖椒肉丝盖饭",1);
        order2.getFoodDir().put("小杯雪碧",1);

        SeniorChef receiver = new SeniorChef();
        Command command1 = new OrderCommand(receiver,order1);
        Command command2 = new OrderCommand(receiver,order2);
        Waitor waitor = new Waitor();
        //设置订单命令
        waitor.setCommand(command1);
        waitor.setCommand(command2);
        //服务员下单
        waitor.orderUp();
    }
}
